/*********************************************
 *  Copyright (c) 2015 Ansible, Inc.
 *
 *  lists.less
 *
 *  custom styles for generated lists
 *
 */

table, tbody {
    border-collapse: collapse;
}

.List-well {
    margin-top: 20px;
}

.List-table{
    width: 100%;
    margin-top: 20px;
    table-layout: fixed;
}

.List-tableHeader{
    height: 34px;
    font-size: 14px;
    font-weight: normal;
    text-transform: uppercase;
    color: @list-header-txt;
    padding-left: 15px;
    padding-right: 15px;
    border-bottom-width:0px!important;
    align-items: center;
    display: flex;
}

.List-tableHeader--info, .List-tableHeader--actions {
    justify-content: flex-end;
}

.List-tableHeader:not([ng-click]) {
    cursor: default !important;
}

.List-tableHeaderSort {
    color: @list-header-icon;
}

.List-tableRow {
    min-height: 44px;
    font-size: 14px;
    color: @list-item;
    border-bottom: 1px solid @default-border;
}

.List-tableRow:last-of-type {
    border-bottom: none;
}

.List-tableRow:hover {
    background-color: @f2grey;
}

.List-tableRow--selected {
    background-color: @list-row-select-bord;
}

.List-tableRow--disabled {
    .List-tableCell, .List-tableCell * {
        color: @b7grey;
        cursor: not-allowed;
    }
}

.List-tableRow--disabled {
    .List-actionButton:hover {
        color: @list-action-icon;
        background-color: @list-actn-bg !important;
    }
}

.List-tableRow--disabled {
    .List-actionButtonCell * {
        color: @default-err;
        font-size: 11px;
        text-transform: uppercase;
    }
}

.List-tableRow--invalid {
    height: 40px;
}

.List-tableRow--invalidBar {
    align-items: center;
    border-left: solid @at-space-2x @at-color-error;
    color: @at-white;
    display: flex;
    height: 100%;
    justify-content: center;
    position: relative;

    i {
        position: absolute;
        left: -7px;
    }
}

.List-tableCell {
    padding: 7px 15px;
    border-top:0px!important;
    word-break: break-word;
    display: flex;
    align-items: center;
    height: 100%;
}

.List-tableCell.description-column {
    padding-top: 15px;
    padding-bottom: 15px;
}

.List-actionButtonCell {
    padding-top:5px;
    padding-right: 0px;
    display:flex;
    justify-content: flex-end;
}

.List-actionButton {
    font-size: 16px;
    height: 30px;
    min-width: 30px;
    color: @list-action-icon;
    background-color: @list-actn-bg;
    border: none;
    border-radius: 4px;
    margin-left: 15px;
}

.List-actionButton:hover {
    background-color: @list-actn-bg-hov !important;
    color: @list-actn-icn-hov;
}

.List-actionButton + .btn-disabled {
    &:hover {
        color: @default-icon-hov;
        background-color: @list-actn-bg !important;
    }
    color: @default-icon-hov;
}

.List-actionButton--delete:hover {
    background-color: @list-actn-del-bg-hov !important;
}

.List-header {
    display: flex;
}

.List-title {
    align-items: center;
    flex: 1 0 auto;
    display: flex;
}

.List-titleBadge {
    font-size: 11px;
    font-weight: normal;
    padding: 2px 10px;
    height: 14px;
    line-height: 10px;
    margin: 0;
    background-color: @list-title-badge;
    border-radius: 5px;
    color: @at-white;
}

.List-titleBadge--selected {
    background-color: @default-link;
}

.List-titleText {
    color: @list-title-txt;
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
    line-height: 0.8;
    text-transform: uppercase;
}

.List-exitHolder {
    justify-content: flex-end;
    display:flex;
}

.List-exit {
    cursor:pointer;
    padding:0px;
    border: none;
    height:20px;
    font-size: 20px;
    background-color:@default-bg;
    color:@d7grey;
    transition: color 0.2s;
    line-height:1;
}

.List-exit:hover{
    color:@default-icon;
}

.List-actionHolder {
    justify-content: flex-end;
    display: flex;
    // margin-bottom: 20px;
    // float: right;
}

@media screen and (max-width: 1200px) {
    .List-actionHolder--rootGroups {
        justify-content: flex-start;
        margin-bottom: 55px;
    }
}

.List-actionHolder--leftAlign {
    margin-left: 50%;
    justify-content: flex-start;
    button {
       height: 34px;
    }
}

.List-actions {
    align-items: center;
    display: flex;
    margin-bottom: -34px;

    .List-buttonDefault {
        margin-left: 20px;
    }

    .List-toggleButton {
        height: 30px;
        line-height: 14px;
    }
}

.List-auxAction {
    align-items: center;
    display: flex;
    order: 1;
    margin-left: 20px;
}

.List-auxActionStream {
    width: 200px;
}

.List-buttonSubmit {
    background-color: @submit-button-bg;
    color: @submit-button-text;
}

.List-buttonSubmit:hover,
.List-buttonSubmit:focus {
    color: @submit-button-text;
    background-color: @submit-button-bg-hov;
}

.List-buttonDefault {
    background-color: @btn-bg;
    color: @btn-txt;
    border-color: @b7grey;
    height: 30px;
    line-height: 14px;
}

.List-buttonDefault:hover,
.List-buttonDefault:focus {
    background-color: @btn-bg-hov;
    color: @btn-txt;
}

.List-buttonDefault[disabled] {
    opacity: 0.65;
}

.List-actionButton {
    margin-left: 20px;
}

.List-searchDropdown {
    border-top-left-radius: 5px!important;
    border-bottom-left-radius: 5px!important;
    height: 34px!important;
    border-color: @d7grey;
    color: @default-icon;
    background-color: @default-bg;
    border-right: none;
}

.List-searchDropdown:focus,
.List-searchDropdown:active,
.List-searchDropdown.active
{
    color: @default-icon;
    background-color: @default-tertiary-bg;
}

.List-searchDropdown:hover {
    background-color: @default-tertiary-bg;
    color: @default-icon;
}

.List-searchDropdownCarat {
    border-top-color: @default-icon!important;
}

.List-searchInput {
    background-color: @list-srch-inpt-bg!important;
    font-size: 14px!important;
    color: @list-srch-inpt-txt!important;
    border-color: @list-srch-inpt-bord!important;
    border-radius: 0px 5px 5px 0px!important;
    padding-left: 15px!important;
    height: 34px!important;
    padding-right: 45px!important;
    font-family: 'Open Sans', sans-serif;
}

.List-searchInput:placeholder-shown {
    color: @list-srch-inpt-ph-txt!important;
    text-transform: uppercase;
}

.List-searchInput:focus {
    border-color: @list-srch-inpt-focus!important;
}

.List-searchInputIcon {
    height: 32px;
    width: 32px;
    border-left: 1px solid @list-srch-inpt-bord;
    color: @list-srch-btn-icon!important;
    float: right;
    position: relative;
    top: -33px;
    left: -2px;
    z-index: 10;
    font-size: 16px;
    background-color: @list-srch-btn-bg;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.List-searchInputIcon:hover {
    cursor: pointer;
    background-color: @list-srch-btn-hov-bg;
    color: @list-srch-btn-icon;
}

.List-searchNoResults {
    color: @default-interface-txt;
    margin-top: 20px;
}

.List-noItems {
    margin-top: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px;
    border-radius: 5px;
    border: 1px solid @d7grey;
    background-color: @default-no-items-bord;
    color: @list-no-items-txt;
    text-transform: uppercase;
    text-align: center;
    padding: 10px;
}

.modal-body > .List-noItems {
    margin-top: 0px;
}

.modal-body > .List-emptyHostFilter {
    margin-top: 20px;
}

.List-actionButton--selected,
.List-editButton--selected {
    background-color: @list-actn-bg-hov !important;
    color: @list-actn-icn-hov;
}

.List-searchWidget {
    height: 34px;
}

.List-searchWidget--compact {
    max-width: ~"calc(100% - 91px)";
    margin-top: 10px;
}

.List-searchRow {
    margin-bottom: 20px;
}

.List-staticColumn--smallStatus {
    width: 25px;
    padding-right: 0px!important;
}

.List-staticColumn--mediumStatus {
    width: 53px;
    padding-right: 0px!important;
}

.List-staticColumn--toggle {
    width: 55px;
    padding-right: 0px !important;
}

.List-staticColumn--schedulerTime {
    max-width: 164px;
}

.List-staticColumn--invalidBar {
    width: 10px;
    padding-right: 0px!important;
}

.List-staticColumnAdjacent {
    padding-left: 10px!important;
}

.List-staticColumnAdjacent--monospace {
    font-family: monospace;
}

.List-titleLockup {
    margin-left: 4px;
    margin-right: 6px;
    display: inline-block;
    margin-top: 0px;
    padding-bottom: 2px;
    vertical-align: bottom;
}

.List-titleLockup:before {
    content: "\007C";
    color: #d7d7d7;
    display: block;
    font-size: 13px;
}

.List-action--showTooltipOnDisabled {
    display: inline-block;
    cursor: not-allowed;
}

.List-action--showTooltipOnDisabled .btn[disabled] {
    pointer-events: none;
}

.List-action--showTooltipOnDisabled.disabled {
    cursor: not-allowed;
}

.List-action--notificationAdd {
    text-align: right;
    font-size: 11px;
}

.List-dropdownSuccess {
    background-color: @submit-button-bg;
    color: @submit-button-text;
    border-color: @submit-button-bg-hov;
}

.List-dropdownSuccess:hover,
.List-dropdownSuccess:focus {
    color: @submit-button-text;
    background-color: @submit-button-bg-hov;
}

.List-infoCell {
    display: flex;
    justify-content: flex-end;
    font-size: 0.8em;
    cursor: pointer;

    .popover-content {
        dl {
            display: flex;
            margin: 0;
        }
        dt, dd {
            flex: 1 1 50%;
            font-weight: inherit;
            margin: 0;
        }
    }
}

.List-actionsInner {
    display: flex;
}

@media (max-width: 991px) {
    .List-searchWidget + .List-searchWidget {
        margin-top: 20px;
    }
}

@media (max-width: 700px) {
    .List-header {
        flex-direction: column;
        align-items: stretch;
    }
    .List-actionHolder {
        justify-content: flex-start;
        align-items: center;
        flex: 1 0 auto;
        margin-top: 12px;
    }
    .List-actions {
        margin-bottom: 20px;
    }
    .List-well {
        margin-top: 20px;
    }

    .List-action {
        margin-left: 20px;
    }

    .List-actionsInner {
        margin-left: -20px;
    }
}

.InventoryManage-container, .modal-body {
    .List-header {
        flex-direction: column;
        align-items: stretch;
    }
    .List-actionHolder {
        justify-content: flex-start;
        align-items: center;
        flex: 1 0 auto;
        margin-top: 12px;
    }
    .List-actions {
        margin-bottom: 20px;
    }
    .List-well {
        margin-top: 20px;
    }
    .List-action:not(.ng-hide) ~ .List-action:not(.ng-hide) {
        margin-left: 0;
    }
}

// Inventory Manage exceptions
.InventoryManage-container {
    .List-actionHolder {
        justify-content: flex-end;
    }
    .List-actions {
        margin: 0 0 -34px 0;
    }
    .SmartSearch-searchTermContainer {
        width: 100%;
    }
}

.List-defaultLayout {
    display: grid;
    grid-template-columns: 5px auto;
}

.List-lookupLayout {
    display: grid;
    grid-template-columns: 26px auto;
}

.List-staticColumnLayout--statusOrCheckbox {
    display: grid;
    grid-template-columns: 5px 25px auto;
}

.List-staticColumnLayout--groups {
    display: grid;
    grid-template-columns: @at-space @at-space-5x @at-space-5x auto;
}

.List-staticColumnLayout--hosts {
    display: grid;
    grid-template-columns: 5px 55px 25px auto;
}

.List-staticColumnLayout--hostsWithCheckbox {
    display: grid;
    grid-template-columns: 5px 25px 55px 25px auto;
}

.List-staticColumnLayout--schedules {
    display: grid;
    grid-template-columns: 5px 15px 55px auto;
}

.List-staticColumnLayout--toggleOnOff {
    display: grid;
    grid-template-columns: 5px 55px auto;
}

.List-table {
    margin-top: 20px;
}

.List-tableHeaderRow {
    background-color: @list-header-bg;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.List-centerEnd {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}
